package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.handler.AuthStudentDataService;
import com.orange.modules.dao.AuthStudentDataRepository;
import com.orange.modules.entity.AuthStudentSubjectMap;
import com.orange.modules.entity.school_data.AuthStudentData;

@Service
public class AuthStudentDataServiceImpl implements AuthStudentDataService{

	
	@Autowired
	private AuthStudentDataRepository authStudentDataRepository;
	
	@Override
	public void insertAuthStudentData(AuthStudentData asd) throws SQLException {
		// TODO Auto-generated method stub
		authStudentDataRepository.insertAuthStudentData(asd);
	}

	@Override
	public void insertAuthStudentSubjectMap(AuthStudentSubjectMap assm)
			throws SQLException {
		// TODO Auto-generated method stub
		authStudentDataRepository.insertAuthStudentSubjectMap(assm);
		
	}

	@Override
	public AuthStudentData queryStudentDataBySchoolId(String schoolId,
			String loginType) throws SQLException {
		// TODO Auto-generated method stub
		AuthStudentData asd = authStudentDataRepository.queryStudentDataBySchoolId(schoolId, loginType);
		return asd;
	}

	@Override
	public List<AuthStudentSubjectMap> queryStudentSubjectByStuId(String stuId) throws SQLException{
		// TODO Auto-generated method stub
		List<AuthStudentSubjectMap> list = authStudentDataRepository.queryStudentSubjectByStuId(stuId);
		return list;
	}

	@Override
	public void deleteAuthStudentSubject(String stuId) throws SQLException {
		// TODO Auto-generated method stub
		authStudentDataRepository.deleteAuthStudentSubject(stuId);
	}

}
